* {
  box-sizing: border-box;
  scrollbar-width: auto;
}

*:hover {
  scrollbar-color: var(--prim-color) transparent; 
}

body, html {
  height: 100%;
  margin: 0;
  background-color: var(--background);
}

body {
  font-family: 'Avenir Next', 'Figtree', sans-serif;
  color: var(--text-color);
  padding: 0;
}

html {
  scrollbar-width: none;
}

::-webkit-scrollbar {
  width: 16px;
  height: 16px; 
}

::-webkit-scrollbar-track {
  background: transparent; 
}

::-webkit-scrollbar-thumb {
  background: rgba(141, 90, 225, 0.6); 
  border-radius: 8px; 
}

::-webkit-scrollbar-thumb:hover {
  background: #8D5AE1; 
  opacity: .9; 
}

p {
  font-size: 1.2rem;
  margin: 0;
}

h1 {
  font-weight: 400;
  font-size: 1.8rem;
  margin: 0;
}

h2 {
  font-weight: 500;
  font-size: 1.6rem;
  line-height: 1.5rem;
  margin: 0;
}

h3 {
  font-weight: 500;
  font-size: 1.6rem;
  line-height: 1.5rem;
  margin: 0;
}

h4 {
  font-weight: 400;
  font-size: 1.8rem;
  line-height: 2.8rem;
  padding: 0;
  margin: 0;
}

.header-wrapper {
  margin: 0 auto;
  display: flex;
  gap: 5rem;
  max-width: 1200px;
  padding: 8rem 3rem;
  flex-direction: row;
  height: 80cqh;
  min-height: 500px;
}

.oval {
    border-radius: 50%;
}

.multiply {
    mix-blend-mode: multiply;
}

.pf {
  min-width: 10rem;
  min-height: 25rem;
  border-radius: 50%;
  border: 0 solid var(--prim-color);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  background-image: url('me.png');
  filter: invert(0) sepia(1) hue-rotate(240deg) saturate(2);
  transition: all 1s ease;
}

.pf:hover {
  filter: invert(100%) sepia(1) hue-rotate(240deg) saturate(2);
  border: 1px solid var(--prim-color);
  background-position: 40% 50%;
}

.header {
  position: relative;
  width: 600px;
  display: flex;
  flex-direction: column;
  gap: 5rem;
  margin: auto 0;
}

.header-text {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.buttons {
  display: inline-flex;
  flex-direction: row;
  gap: 0.7rem;
}

.button {
  align-self: flex-start;
  font-weight: 400;
  background-color: transparent;
  width: auto;
  min-width: 4rem;
  height: 4rem;
  color: var(--prim-color);
  border: 1px solid var(--prim-color);
  border-radius: 50%;
  padding: 0;
  transition: none;
  display: inline-flex;
  flex-direction: row;
  gap: .5rem;
}

.button svg {
  aspect-ratio: 1;
  margin: auto auto;
}

.button p {
  margin: auto 1.5rem;
}

.button:hover {
  color: var(--background);
  background-color: var(--prim-color);
  text-decoration: none;
}

.button:active {
  color: var(--background);
  background-color: var(--dark-color);
  text-decoration: none;
}

.button:focus {
  border-width: 2px;
}

.button:hover svg path {
  fill: var(--background);
}

.back {
  position: fixed;
  left: 3rem;
  bottom: 3rem;
  z-index: 100;
}

.card {
  transition: color 0.3s ease, box-shadow 0.3s ease, transform .5s ease, margin-bottom .8s ease, margin-top .8s ease;
  margin-bottom: 2rem;
  cursor: pointer;
}

.card-image {
  position: relative;
  border-radius: 50%;
  min-height: 300px;
  height: 50cqh;
  overflow: hidden;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  transition: all .3s ease;
}

.card:hover .card-image {
  outline: 4px solid var(--prim-color);
  outline-offset: 6px;
}

.card:active .card-image {
  outline: 4px solid var(--dark-color);
  outline-offset: 3px;
}

.badge {
  display: block;
  width: 10%;
  min-width: 75px;
  max-width: 100px;
  position: absolute;
  top: 18px;
  right: 20%;

}

.card-text {
  display: flex;
  flex-direction: column;
  gap: .8rem;  /* Adjust this value as needed, make sure it's a positive value */
}

.card-text h2 {
  margin: 1.6rem 0 0 0; 
  padding: 0;
}

.card-text p {
  margin: 0;
  padding: 0;
}

.tags {
  font-size: 1.2rem;
  opacity: .5;
}

.card-link {
  color: var(--text-color);
}

.card-link:hover {
  text-decoration: none;
  color: var(--prim-color);
}

.card-link:focus {
  outline-offset: 4px;
}

.card:hover {
  color: var(--prim-color);
}

.card:active {
  transform: scale(1);
  color: var(--dark-color);
}

.sidequest {
  display: flex;
  flex-direction: row;
  margin: 0;
}

.sidequest .card-image {
  width: 40cqw;
  min-height: 100px;
  height: auto;
}

.sidequest:hover {
  transform: none;
  text-shadow: none;
  color: var(--text-color);
}

.sidequest .border {
  width: 6px;
  opacity: 0;
  background-color: var(--prim-color);
  transition: opacity .3s ease;
}

.sidequest:hover .border {
  opacity: 1;
}

.sidequest:active .border {
  background-color: var(--dark-color);
}

.sidequest .card-text {
  width: 60cqw;
  margin: 0;
  padding: 3rem;
}

.sidequest-text {
  margin: 8rem 3rem 3rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 720px;
}

.gallery {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

a {
  color:var(--prim-color);
  text-decoration: none;
  text-decoration-thickness: 0;
  font-weight: 400;
  cursor: pointer;
  transition: none;
}

a:hover {
  text-decoration: underline;
  text-decoration-thickness: 10%;
}

a:active {
  text-decoration-thickness: 1px;
  text-decoration-style: wavy;
}

a img:hover{
  outline:1px solid white;
  outline-offset: .5rem;
}

a.outlink::after {
  content: '⤴';
}

.footer {
  text-align: center;
  max-width: 1200px;
  padding: 10rem 0 2rem 0;
  margin: 0 auto;
  color: var(--gray-500);
  font-size: 0.9rem;
}

.onscroll {
    opacity: 0;  /* Start elements as invisible */
    transition: opacity 1s ease; /* Smooth transition for the fade-in */
}

.onscroll.visible {
    opacity: 1;  /* Fully visible when in viewport */
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  gap: .5rem;
}

.filter-chip {
  border: 1px solid var(--background);
  background: transparent;
  color: var(--prim-color);
  font: inherit;
  padding: 0.45rem 0.9rem;
  border-radius: 50%;
  transition: background-color .15s, color .15s, border-color .15s, transform .05s;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.filter-chip[aria-pressed="false"] {
  cursor: pointer;
}

.filter-chip:hover {
  border: 1px solid var(--prim-color);
}

.filter-chip[aria-pressed="true"] {
  border: 1px solid var(--prim-color);
}

@media (max-width: 448px) {

  .pf {
    display: inline-flex;
    min-height: 0;
    min-width: 0;
    height: 8rem;
    width: auto;
  }

  .header-wrapper {
    margin-bottom: 2rem;
    display:inline-flex;
    flex-direction: column;
    height: auto;
    padding: 2rem 2rem;
    gap: 2.5rem;
  }

  .header {
    width: auto;
    gap: 2rem;
  }

  .buttons {
    display: inline-flex;
    flex-direction: row;
    justify-content: space-between;
  }

  .gallery {
    padding: 1rem;
    gap: 1.2rem;
  }

  .sidequest {
    display: flex;
    flex-direction: column-reverse;
    gap: .5rem;
    margin: 1rem 0;
  }

  .sidequest-text {
    margin: 0;
  }

  .sidequest .card-text {
    width: 100%;
    margin: 0;
    padding: 0;
  }

  .sidequest .card-image {
    width: 100%;
    height: auto;
  }

  .sidequest .border {
    display: none;
  }
  .footer {
      padding: 5rem 1rem 0.5rem 1rem;
  }
}